package cn.ad.server.domain.ad;

import java.io.Serializable;
import java.util.Date;

public class AppClass implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5634584403182679667L;
	static final String VERSION = "0";
	static final String CACHE_NAME = "appclass";
	
	private int id;
	private int level;
	private int parentId;
	private AppClass parentAppClass;
	private String name;
	private Date createDate;
	
	
	public static String cacheKey(int id) {
		return new StringBuilder(CACHE_NAME).append(":").append(VERSION).append(":").append(id).toString();
	}

	public String toCacheKey() {
		return new StringBuilder(CACHE_NAME).append(":").append(VERSION).append(":").append(this.getId()).toString();
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public int getParentId() {
		return parentId;
	}

	public void setParentId(int parentId) {
		this.parentId = parentId;
	}

	public AppClass getParentAppClass() {
		return parentAppClass;
	}

	public void setParentAppClass(AppClass parentAppClass) {
		this.parentAppClass = parentAppClass;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}


}
